package com.lude.erp.prototype.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.lude.erp.common.model.BaseModel;

@Entity(name = "identity_role_permission")
public class IdentityRolePermission implements BaseModel
{

	private static final long serialVersionUID = 1L;

	private long rolePermissionId;

	private SystemFunctionPermission systemFunctionPermission;

	private IdentityRole identityRole;

	private Date createdDate;

	private Date createdDatetime;

	private Date updatedDate;

	private Date updatedDatetime;

	@Id
	@GeneratedValue
	public long getRolePermissionId()
	{
		return rolePermissionId;
	}

	public void setRolePermissionId(long rolePermissionId)
	{
		this.rolePermissionId = rolePermissionId;
	}

	@ManyToOne
	@JoinColumn(name = "function_permission_id")
	public SystemFunctionPermission getSystemFunctionPermission()
	{
		return systemFunctionPermission;
	}

	public void setSystemFunctionPermission(SystemFunctionPermission systemFunctionPermission)
	{
		this.systemFunctionPermission = systemFunctionPermission;
	}

	@ManyToOne
	@JoinColumn(name = "role_id")
	public IdentityRole getIdentityRole()
	{
		return identityRole;
	}

	public void setIdentityRole(IdentityRole identityRole)
	{
		this.identityRole = identityRole;
	}

	public Date getCreatedDate()
	{
		return createdDate;
	}

	public void setCreatedDate(Date createdDate)
	{
		this.createdDate = createdDate;
	}

	public Date getCreatedDatetime()
	{
		return createdDatetime;
	}

	public void setCreatedDatetime(Date createdDatetime)
	{
		this.createdDatetime = createdDatetime;
	}

	public Date getUpdatedDate()
	{
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate)
	{
		this.updatedDate = updatedDate;
	}

	public Date getUpdatedDatetime()
	{
		return updatedDatetime;
	}

	public void setUpdatedDatetime(Date updatedDatetime)
	{
		this.updatedDatetime = updatedDatetime;
	}

}
